package com.yn.xr.common.page;
import java.util.List;

import com.github.pagehelper.PageInfo;

public class PageInfoToPage {

	public static Page toPage(List list){
		
		Page page = null;
		PageInfo pageInfo = new PageInfo(list);
    	page = new Page(list,pageInfo.getPages(),
    			pageInfo.getPageSize(), pageInfo.getPageNum(), new Long(pageInfo.getTotal()).intValue());
		return page;
	}
}
